<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>咸鱼APP原型 - 消息与个人中心</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#FF5E5E',
            gray: {
              100: '#F5F5F5',
              200: '#E5E5E5',
              300: '#D4D4D4',
              400: '#A3A3A3',
              500: '#737373',
              600: '#525252',
            }
          },
          fontFamily: {
            sans: ['PingFang SC', 'Helvetica Neue', 'Arial', 'sans-serif'],
          },
        },
      }
    }
  </script>
  
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
      }
      .scrollbar-hide::-webkit-scrollbar {
        display: none;
      }
      .badge-dot {
        position: relative;
      }
      .badge-dot::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 8px;
        height: 8px;
        background-color: theme('colors.primary');
        border-radius: 50%;
      }
    }
  </style>
</head>

<body class="bg-gray-100 font-sans text-gray-800 min-h-screen">
  <!-- 页面切换控制器 -->
  <div class="fixed top-4 left-1/2 transform -translate-x-1/2 z-50 bg-white shadow-md rounded-full px-4 py-2 flex space-x-6">
    <button id="msg-btn" class="text-primary font-medium">消息页面</button>
    <button id="user-btn" class="text-gray-500">个人中心</button>
  </div>

  <!-- 消息中心页面 -->
  <div id="message-page" class="max-w-md mx-auto bg-white min-h-screen pt-20 pb-20 relative">
    <!-- 顶部导航 -->
    <header class="fixed top-0 left-0 right-0 max-w-md mx-auto bg-white z-40 border-b border-gray-200">
      <div class="flex items-center justify-between px-4 py-4">
        <h1 class="text-xl font-bold">消息</h1>
        <button class="text-gray-600">
          <i class="fa fa-cog text-xl"></i>
        </button>
      </div>
      
      <!-- 消息筛选标签 -->
      <div class="flex overflow-x-auto scrollbar-hide border-b border-gray-200">
        <div class="px-4 py-3 text-primary font-medium border-b-2 border-primary whitespace-nowrap">
          全部
        </div>
        <div class="px-4 py-3 text-gray-500 whitespace-nowrap">
          未读(3)
        </div>
        <div class="px-4 py-3 text-gray-500 whitespace-nowrap">
          交易消息
        </div>
        <div class="px-4 py-3 text-gray-500 whitespace-nowrap">
          系统通知
        </div>
      </div>
    </header>

    <!-- 消息列表 -->
    <main class="p-2">
      <!-- 聊天列表项 -->
      <div class="flex items-center p-3 border-b border-gray-100 hover:bg-gray-50">
        <img src="https://picsum.photos/60/60?random=10" alt="用户头像" class="w-12 h-12 rounded-full object-cover">
        <div class="flex-1 ml-3">
          <div class="flex justify-between">
            <h3 class="font-medium">小米爱好者</h3>
            <span class="text-xs text-gray-400">10:23</span>
          </div>
          <div class="flex justify-between items-center">
            <p class="text-sm text-gray-500 truncate">最低1800元，不能再低了</p>
            <span class="w-5 h-5 rounded-full bg-primary text-white text-xs flex items-center justify-center ml-2">2</span>
          </div>
        </div>
      </div>

      <div class="flex items-center p-3 border-b border-gray-100 hover:bg-gray-50">
        <img src="https://picsum.photos/60/60?random=11" alt="用户头像" class="w-12 h-12 rounded-full object-cover">
        <div class="flex-1 ml-3">
          <div class="flex justify-between">
            <h3 class="font-medium">运动达人</h3>
            <span class="text-xs text-gray-400">昨天</span>
          </div>
          <p class="text-sm text-gray-500 truncate">鞋子还在吗？能便宜点吗？</p>
        </div>
      </div>

      <div class="flex items-center p-3 border-b border-gray-100 hover:bg-gray-50">
        <img src="https://picsum.photos/60/60?random=12" alt="用户头像" class="w-12 h-12 rounded-full object-cover">
        <div class="flex-1 ml-3">
          <div class="flex justify-between">
            <h3 class="font-medium">摄影师小李</h3>
            <span class="text-xs text-gray-400">昨天</span>
          </div>
          <p class="text-sm text-gray-500 truncate">相机配件齐全，有兴趣可以拍</p>
        </div>
      </div>

      <!-- 系统通知 -->
      <div class="flex items-center p-3 border-b border-gray-100 hover:bg-gray-50">
        <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center text-blue-500">
          <i class="fa fa-bell"></i>
        </div>
        <div class="flex-1 ml-3">
          <div class="flex justify-between">
            <h3 class="font-medium">系统通知</h3>
            <span class="text-xs text-gray-400">3天前</span>
          </div>
          <p class="text-sm text-gray-500 truncate">您发布的商品已通过审核，快去看看吧</p>
        </div>
      </div>

      <div class="flex items-center p-3 border-b border-gray-100 hover:bg-gray-50">
        <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center text-green-500">
          <i class="fa fa-shopping-cart"></i>
        </div>
        <div class="flex-1 ml-3">
          <div class="flex justify-between">
            <h3 class="font-medium">交易提醒</h3>
            <span class="text-xs text-gray-400">1周前</span>
          </div>
          <p class="text-sm text-gray-500 truncate">您购买的商品已发货，快递单号：SF123456789</p>
        </div>
      </div>
    </main>

    <!-- 底部导航 -->
    <footer class="fixed bottom-0 left-0 right-0 max-w-md mx-auto bg-white border-t border-gray-200 flex justify-around py-2">
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-home text-xl"></i>
        <span class="text-xs mt-1">首页</span>
      </div>
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-compass text-xl"></i>
        <span class="text-xs mt-1">发现</span>
      </div>
      <div class="flex flex-col items-center">
        <div class="w-12 h-12 rounded-full bg-primary flex items-center justify-center -mt-4">
          <i class="fa fa-plus text-white text-xl"></i>
        </div>
      </div>
      <div class="flex flex-col items-center text-primary">
        <i class="fa fa-bell text-xl badge-dot relative"></i>
        <span class="text-xs mt-1">消息</span>
      </div>
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-user-o text-xl"></i>
        <span class="text-xs mt-1">我的</span>
      </div>
    </footer>
  </div>

  <!-- 个人中心页面 -->
  <div id="user-page" class="max-w-md mx-auto bg-white min-h-screen pt-20 pb-20 relative hidden">
    <!-- 顶部导航 -->
    <header class="fixed top-0 left-0 right-0 max-w-md mx-auto bg-white z-40 border-b border-gray-200">
      <div class="flex items-center justify-between px-4 py-4">
        <h1 class="text-xl font-bold">我的</h1>
        <button class="text-gray-600">
          <i class="fa fa-gear text-xl"></i>
        </button>
      </div>
    </header>

    <!-- 个人信息区 -->
    <div class="bg-gradient-to-r from-red-400 to-red-600 p-6 text-white">
      <div class="flex items-center">
        <img src="https://picsum.photos/80/80?random=20" alt="用户头像" class="w-16 h-16 rounded-full border-2 border-white object-cover">
        <div class="ml-3">
          <h2 class="font-bold text-lg">用户_12345</h2>
          <p class="text-sm opacity-90">V2 普通用户</p>
        </div>
        <button class="ml-auto text-white border border-white rounded-full px-3 py-1 text-sm">
          编辑资料
        </button>
      </div>
    </div>

    <!-- 快捷功能区 -->
    <div class="grid grid-cols-3 gap-4 p-4">
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-th-large text-primary text-xl"></i>
        <span class="text-sm mt-2">我的发布</span>
        <span class="text-xs text-gray-500 mt-1">5件</span>
      </div>
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-star-o text-primary text-xl"></i>
        <span class="text-sm mt-2">我的收藏</span>
        <span class="text-xs text-gray-500 mt-1">12件</span>
      </div>
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-truck text-primary text-xl"></i>
        <span class="text-sm mt-2">待收货</span>
        <span class="text-xs text-gray-500 mt-1">2件</span>
      </div>
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-credit-card text-primary text-xl"></i>
        <span class="text-sm mt-2">待付款</span>
        <span class="text-xs text-gray-500 mt-1">1件</span>
      </div>
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-comment-o text-primary text-xl"></i>
        <span class="text-sm mt-2">待评价</span>
        <span class="text-xs text-gray-500 mt-1">3件</span>
      </div>
      <div class="flex flex-col items-center p-3 bg-gray-50 rounded-lg">
        <i class="fa fa-refresh text-primary text-xl"></i>
        <span class="text-sm mt-2">售后服务</span>
        <span class="text-xs text-gray-500 mt-1">0件</span>
      </div>
    </div>

    <!-- 工具模块 -->
    <div class="p-4">
      <div class="bg-white rounded-lg border border-gray-100">
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <i class="fa fa-map-marker text-gray-500 text-xl w-8"></i>
            <span>地址管理</span>
          </div>
          <i class="fa fa-angle-right text-gray-400"></i>
        </div>
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <i class="fa fa-ticket text-gray-500 text-xl w-8"></i>
            <span>优惠券</span>
            <span class="ml-2 bg-primary/10 text-primary text-xs px-2 py-0.5 rounded-full">8张</span>
          </div>
          <i class="fa fa-angle-right text-gray-400"></i>
        </div>
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <i class="fa fa-question-circle text-gray-500 text-xl w-8"></i>
            <span>客服中心</span>
          </div>
          <i class="fa fa-angle-right text-gray-400"></i>
        </div>
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <i class="fa fa-shield text-gray-500 text-xl w-8"></i>
            <span>安全中心</span>
          </div>
          <i class="fa fa-angle-right text-gray-400"></i>
        </div>
        <div class="flex items-center justify-between p-4">
          <div class="flex items-center">
            <i class="fa fa-cog text-gray-500 text-xl w-8"></i>
            <span>设置</span>
          </div>
          <i class="fa fa-angle-right text-gray-400"></i>
        </div>
      </div>
    </div>

    <!-- 底部区域 -->
    <div class="text-center mt-8">
      <button class="text-primary text-sm">退出登录</button>
      <p class="text-xs text-gray-400 mt-4">v6.8.0</p>
    </div>

    <!-- 底部导航 -->
    <footer class="fixed bottom-0 left-0 right-0 max-w-md mx-auto bg-white border-t border-gray-200 flex justify-around py-2">
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-home text-xl"></i>
        <span class="text-xs mt-1">首页</span>
      </div>
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-compass text-xl"></i>
        <span class="text-xs mt-1">发现</span>
      </div>
      <div class="flex flex-col items-center">
        <div class="w-12 h-12 rounded-full bg-primary flex items-center justify-center -mt-4">
          <i class="fa fa-plus text-white text-xl"></i>
        </div>
      </div>
      <div class="flex flex-col items-center text-gray-500">
        <i class="fa fa-bell text-xl"></i>
        <span class="text-xs mt-1">消息</span>
      </div>
      <div class="flex flex-col items-center text-primary">
        <i class="fa fa-user-o text-xl"></i>
        <span class="text-xs mt-1">我的</span>
      </div>
    </footer>
  </div>

  <script>
    // 页面切换功能
    const msgBtn = document.getElementById('msg-btn');
    const userBtn = document.getElementById('user-btn');
    const msgPage = document.getElementById('message-page');
    const userPage = document.getElementById('user-page');

    msgBtn.addEventListener('click', () => {
      msgPage.classList.remove('hidden');
      userPage.classList.add('hidden');
      msgBtn.classList.add('text-primary', 'font-medium');
      msgBtn.classList.remove('text-gray-500');
      userBtn.classList.add('text-gray-500');
      userBtn.classList.remove('text-primary', 'font-medium');
    });

    userBtn.addEventListener('click', () => {
      userPage.classList.remove('hidden');
      msgPage.classList.add('hidden');
      userBtn.classList.add('text-primary', 'font-medium');
      userBtn.classList.remove('text-gray-500');
      msgBtn.classList.add('text-gray-500');
      msgBtn.classList.remove('text-primary', 'font-medium');
    });
  </script>
</body>
</html>
